#ifndef __SPIN_H
#define __SPIN_H

#include "share/Usrdef.h"
#include "core/globalvars.h"

#ifdef NV_CENTER
#include "special/interaction_NV.h"
#endif

#ifdef SiC_4H
#include "special/interaction_4HSiC.h"
#endif

#include "share/GenClst_Control.h"

struct sVECTOR
{
	double x, y, z;
};

class cSPIN
{
public:
	void	    initialize_SingleSample(int idx, double mag, double gamma, int init_state);
	void	    initialize_Ensemble(int idx, double mag, double gamma );    //ensemble CCE

	int         state(){return init_state;};
	double	    Zeeman(){return zeemanenergy;};
	sVECTOR     mf(){return meanfield;};
	sVECTOR     hf(int i){ return (i==1 ? hyperfine_field1 : hyperfine_field2);};


protected:
private:
	int	index;
	int	init_state;

	int	Sval;
	int	Szval;
	double	* wavefunc;

	double  zeemanenergy;

	double	extfield;
	sVECTOR	meanfield;
	sVECTOR hyperfine_field1;
	sVECTOR hyperfine_field2;

};

void SingleSpinInitialization(cSPIN * spinlist);

#endif
